package com.example.demo.service;

import java.util.List;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.example.demo.domain.ArticleImage;
import com.example.demo.mapper.ArticleImageMapper;

@Service
public class ArticleImageServiceImpl implements ArticleImageService{
	private final Logger logger = LoggerFactory.getLogger(this.getClass());

	@Autowired
	ArticleImageMapper articleImageMapper;
	@Override
	public List<ArticleImage> getImagesOfArticleByAid(Long aid) {
		logger.info("----"+"getImagesOfArticleByAid(): ");
		return articleImageMapper.selectAllImagesByAid(aid);
	}
	@Override
	public int addImageOfArticle(ArticleImage articleImage) {
		logger.info("----"+"insertImageOfArticle(): ");
		return articleImageMapper.insertImageOfArticle(articleImage);
	}

}
